package com.wallace.downloadserver.util.myToken

import com.wallace.downloadserver.service.UserService
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest

/**
 * @Author: Wallace
 * @Description:token工具类单元测试用例
 * @Date: 2022/1/13 21:05
 * @Modified By:
 */
@SpringBootTest
internal class TokenUtilTest {

//    private var tokenString: String? = null
//
//    @Autowired
//    private val userService: UserService? = null
//
//    @BeforeEach
//    fun testSignNettyToken() {
//        val user = userService!!.selectByPrimaryKey("202201120000001")
//        tokenString = user?.let { TokenUtil.signNettyToken(it) }
//        assert(tokenString != null)
//        println("token = $tokenString")
//    }
//
//    @Test
//    fun testVerifyToken() {
//        assert(tokenString != null)
//        assert(TokenUtil.verifyToken(tokenString!!) != null)
//    }
}